<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/taglib.jsp"%>
<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
   
</script>
<div class="action  divaction">
    <div class="t">员工列表</div>
    <div class="pages">
        <div class="forms">
            <form action="EmpServlet" name="" method="get">
                    <label>姓名</label>
                    <input id="empName" name="empName" value=""/>
                <input type="hidden" name="opr" value="list"/>
                <input type="hidden" name="pageIndex" value="1"/>
                <input type="submit" cssClass="submit_01" value="查询"/>
                </form>
        </div>
        <!--列表  开始-->
        <table width="90%" border="0" cellspacing="0" cellpadding="0" class="list items">
            <tr class="even">
                <td>编号</td>
                <td>工号</td>
                <td>姓名</td>
                <td>部门</td>
                <td>入职时间</td>
                <td>操作</td>
            </tr>
            <c:forEach var="tmp" items="${empList}">
                <tr>
                    <td>${tmp.id}</td>
                    <td>${tmp.employeeNo}</td>
                    <td>${tmp.name}</td>
                    <td>${tmp.positionName}</td>
                    <td>${tmp.entryTime}</td>
                    <td>
                        <a href="EmpServlet?opr=modifview&id=${tmp.id}">
                            <img src="images/edit.gif" width="16" height="16" />
                        </a>
                        <a>
                            <img src="images/delete.gif" width="16" height="16" />
                        </a>
                        <a href="EmpServlet?opr=view&id=${tmp.id}">
                            <img src="images/search.gif" width="16" height="15" />
                        </a>
                    </td>
                </tr>
            </c:forEach>
        </table>
        <!--列表 结束-->
    </div>
</div>

<script>
    function  del(id) {
        var isDel = confirm("您确定删除吗？");
        if(isDel){//删除
            location.href="EmpServlet?opr=del&id="+id;
        }
    }
</script>
